/*
* @author Cole Gehlen
*/
package com.apps.test;
import static org.junit.Assert.*;
import org.junit.Test;
import com.apps.services.AmazonWebService;
import com.apps.services.factory.AmazonWebServiceFactory;
import com.apps.ubc.cc.model.AmazonBookModel;
public class AmazonWebServiceTest {
@Test
public void test() {
AmazonWebService aws = AmazonWebServiceFactory.getAmazonWebService();
AmazonBookModel abm = aws.search("9780495391326");
assertTrue(abm.getAsin().equals("0495391328"));
assertTrue(abm.getDetailUrl().equals("http://www.amazon.ca/Discrete-Mathematics-Applications-Susanna-Epp/dp/0495391328%3FSubscriptionId%3DAKIAI2EIYYQQFCWV6XCA%26tag%3Dubcoco03-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0495391328"));
assertTrue(abm.getImageUrl().equals("http://ecx.images-amazon.com/images/I/41BEcqUOPbL._SL75_.jpg"));
assertTrue(abm.getPriceNew().equals("CDN$ 172.33"));
assertTrue(abm.getPriceUsed().equals("CDN$ 130.00"));
assertTrue(abm.getTitle().equals("Discrete Mathematics with Applications"));
}
}